Python 3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.
import sys
import os
from importlib_metadata import distribution
pwd = os.getcwd()
modellingpath = pwd.rpartition("modelling")[0] + pwd.rpartition("modelling")[1]
sys.path.append(modellingpath + '/lib')
#############
from numerical.cn_edgegrowth2_numba import cn_edgegrowth2 as cn_edgegrowth2_numba
from numerical.cn_edgegrowth2 import cn_edgegrowth2
from numerical.cn_nogrowth import cn_nogrowth
from numerical.cn_plot import plot1D, surfpattern
import pickle
import matplotlib.pyplot as plt
import time
import numpy as np
from tqdm import tqdm
#system parameters
circuit_n = 'turinghill'
variant=0
n_param_sets = 2000000
# par_dict = {'c1':0.1, 'c2':1,'c3':0.9,'c4':1, 'd_A': 1, 'd_B':10}
df= pickle.load( open(modellingpath + "/growth/out/analytical/turing/turing_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
# df= pickle.load( open(modellingpath + "/growth/out/analytical/instability/instability_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
df.index.names = ['parID','ss']
# df = multiple_df.xs(0, level=1)
#solver parameters
L=500; x_gridpoints=1; J=L*x_gridpoints;I=J
T=3000; t_gridpoints = 5; N=T*t_gridpoints #Number of timepoints <below 3 is bad if x_gridpoints=1
boundaryCoeff=2;rate=0.1
print(len(df))
filename= lambda mechanism, parID: 'circuit%s_variant%s_bc%s_%s_rate%s_ID%s_L%r_J%r_T%r_N%r'%(circuit_n,variant,boundaryCoeff, mechanism,rate,parID,L,J,T,N)
for parID,ss in tqdm(df.index):
parIDss = f'{parID}.{ss}'
print(parIDss)
mechanism = 'edgegrowth2'
par_dict = df.loc[(parID,ss)].to_dict()
print(par_dict)
U_final,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=rate, boundaryCoeff=boundaryCoeff, tqdm_disable=True)
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
plot1D(U_final)
plt.show()
mechanism = 'nogrowth'
U_final,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=True)
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
plot1D(U_final)
plt.show()
# #run
# no_numba = False
# if no_numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time numba:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# plt.scatter(x_grid,cellMatrix)
# plt.show()
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# numba=False
# if numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# no_growth = True
# if no_growth == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=False)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# print(np.sum(U_final[0]))
0%| | 0/31 [00:00<?, ?it/s]
31
118941.0
{'ba': 0.01, 'bb': 0.01, 'Va': 815.2281990625947, 'Vb': 869.092720545832, 'kaa': 12.891931764200102, 'kba': 42.952283653646234, 'kab': 1.6989749233704032, 'kbb': 184.85059192663672, 'mua': 1.2913151609791507, 'mub': 1.3882435185207276, 'd_B': 9.871792232811737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.36781896, 28.03584002]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.5281387272214166+0j), 'complex_dispersion': True}
negative
3%|▎ | 1/31 [00:14<07:10, 14.35s/it]
130517.2
{'ba': 0.01, 'bb': 0.01, 'Va': 114.2943824225333, 'Vb': 135.5191790082118, 'kaa': 31.039471979008834, 'kba': 8.382989354562715, 'kab': 23.895203185186315, 'kbb': 0.680626361413112, 'mua': 0.10629343462009974, 'mub': 0.09833370115985028, 'd_B': 8.061394127036298, 'd_A': 1.0, 'n': 2.0, 'ss_n': 4.0, 'ss_list': array([1.99812735, 9.67041749]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.002129146044943686+0j), 'complex_dispersion': True}
negative
6%|▋ | 2/31 [00:25<06:30, 13.45s/it]
135128.1
{'ba': 0.01, 'bb': 0.01, 'Va': 27.564908966425694, 'Vb': 326.25772039061815, 'kaa': 1.7568405193731178, 'kba': 1.4857913308384587, 'kab': 3.6312436959757273, 'kbb': 58.459387568413824, 'mua': 1.5994924753282964, 'mub': 1.819611424644346, 'd_B': 8.272981979622703, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.29640735, 1.19224465]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.23246594566876855+0j), 'complex_dispersion': True}
negative
10%|▉ | 3/31 [00:36<05:55, 12.70s/it]
350981.4
{'ba': 0.01, 'bb': 0.01, 'Va': 239.16045466671721, 'Vb': 34.63637728615317, 'kaa': 36.2339505371141, 'kba': 64.48723450348534, 'kab': 2.2029491724002734, 'kbb': 3.8503227579228367, 'mua': 0.176897911154491, 'mub': 0.21967063862747171, 'd_B': 9.765606067430125, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 1.51834334, 50.82511564]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.06622513286767573+0j), 'complex_dispersion': True}
negative
13%|█▎ | 4/31 [00:48<05:34, 12.39s/it]
351953.1
{'ba': 0.01, 'bb': 0.01, 'Va': 54.18484104015259, 'Vb': 47.25741550983462, 'kaa': 11.605058993398924, 'kba': 33.85514282492236, 'kab': 4.32564142907592, 'kbb': 57.999664182403706, 'mua': 0.408073564739178, 'mub': 0.4027145677064975, 'd_B': 8.87692980159737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 3.98772768, 53.936696 ]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.028127901418268264+0j), 'complex_dispersion': True}
negative
16%|█▌ | 5/31 [01:01<05:27, 12.58s/it]
360416.1
{'ba': 0.01, 'bb': 0.01, 'Va': 385.5088897168174, 'Vb': 110.22121523587622, 'kaa': 2.483706697966257, 'kba': 0.9711051957031617, 'kab': 0.40104277427424595, 'kbb': 42.103036140718736, 'mua': 5.250474461283016, 'mub': 14.083381020752846, 'd_B': 7.772167659674627, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.12386348, 0.68225491]), 'ss_class': 'stable point', 'system_class': 'turing I', 'maxeig': (0.17701025304920037+0j), 'complex_dispersion': False}
negative
negative
negative
19%|█▉ | 6/31 [01:15<05:26, 13.06s/it]
472883.2
{'ba': 0.01, 'bb': 0.01, 'Va': 290.6327418040253, 'Vb': 11.45621109841897, 'kaa': 14.439605207063384, 'kba': 0.7407539897652289, 'kab': 8.226865404352063, 'kbb': 160.62343879687893, 'mua': 3.3465368714702333, 'mub': 3.9901290059736207, 'd_B': 6.620820479626943, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([3.94695606, 0.5397153 ]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.5550199052762483+0j), 'complex_dispersion': True}
23%|██▎ | 7/31 [01:26<04:58, 12.46s/it]
486068.2
{'ba': 0.01, 'bb': 0.01, 'Va': 997.2903282608314, 'Vb': 43.111126294326105, 'kaa': 155.8052786664667, 'kba': 5.559437646546131, 'kab': 17.475798599213125, 'kbb': 0.11000134341052847, 'mua': 0.048235757764698135, 'mub': 0.0802045896337645, 'd_B': 7.693765988716828, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([1.36567456, 3.38727262]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0021226246628133216+0j), 'complex_dispersion': True}
negative
26%|██▌ | 8/31 [01:40<04:54, 12.80s/it]
546109.1
{'ba': 0.01, 'bb': 0.01, 'Va': 202.03958750174837, 'Vb': 34.49501460261308, 'kaa': 3.375462276950734, 'kba': 20.057786219077514, 'kab': 0.4415101363086828, 'kbb': 37.15703655950709, 'mua': 0.18011977945255836, 'mub': 0.14115099075969806, 'd_B': 5.773968725763372, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.59267954, 157.23763183]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.013721466808561122+0j), 'complex_dispersion': True}
29%|██▉ | 9/31 [01:52<04:41, 12.78s/it]
742006.2
{'ba': 0.01, 'bb': 0.01, 'Va': 115.40492671282917, 'Vb': 35.75298038735518, 'kaa': 2.3843297731692674, 'kba': 3.9720414027865862, 'kab': 0.22270580063721748, 'kbb': 2.4367359875485, 'mua': 1.1586282735305444, 'mub': 1.2757264967083521, 'd_B': 5.211852873994694, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.0676013 , 2.37223273]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.16226784711775366+0j), 'complex_dispersion': True}
32%|███▏ | 10/31 [02:04<04:21, 12.44s/it]
862004.2
{'ba': 0.01, 'bb': 0.01, 'Va': 15.342934792094486, 'Vb': 754.2975569594662, 'kaa': 1.6557933391612487, 'kba': 8.439693370086474, 'kab': 6.603317355743912, 'kbb': 8.006935541273098, 'mua': 2.7471878890929213, 'mub': 2.1766960056095455, 'd_B': 6.436259387327192, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.74958926, 4.41325274]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.4247302804824109+0j), 'complex_dispersion': True}
35%|███▌ | 11/31 [02:15<04:02, 12.13s/it]
1121752.2
{'ba': 0.01, 'bb': 0.01, 'Va': 35.09596281919261, 'Vb': 42.009523487375624, 'kaa': 204.67025945320665, 'kba': 129.52996179175673, 'kab': 196.2069645904714, 'kbb': 0.2434143443237951, 'mua': 0.02061094760029868, 'mub': 0.020158654231861257, 'd_B': 7.5919466938069515, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 49.09562577, 123.28756485]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0008073348759318894+0j), 'complex_dispersion': True}
negative
39%|███▊ | 12/31 [02:28<03:51, 12.18s/it]
1133916.0
{'ba': 0.01, 'bb': 0.01, 'Va': 25.28034579814929, 'Vb': 24.820602749573567, 'kaa': 0.46665031483665004, 'kba': 2.894328309523785, 'kab': 0.17150018214289278, 'kbb': 22.58855246886253, 'mua': 2.3401280586314592, 'mub': 1.8123012418852684, 'd_B': 9.29657417053512, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.20345611, 8.01213494]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0951403612171493+0j), 'complex_dispersion': True}
negative
42%|████▏ | 13/31 [02:40<03:38, 12.15s/it]
1195022.4
{'ba': 0.01, 'bb': 0.01, 'Va': 611.4433330118857, 'Vb': 65.41842217773055, 'kaa': 3.679403701088877, 'kba': 4.9161447235193645, 'kab': 0.2918676371684259, 'kbb': 23.16548966879861, 'mua': 2.681935721389821, 'mub': 3.6395321051690397, 'd_B': 3.8688919677210523, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 0.40738494, 11.88045562]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.143157693219905+0j), 'complex_dispersion': True}
45%|████▌ | 14/31 [02:52<03:26, 12.14s/it]
1251569.4
{'ba': 0.01, 'bb': 0.01, 'Va': 78.3363322679065, 'Vb': 335.81879962648486, 'kaa': 4.829453494045339, 'kba': 130.86352922113667, 'kab': 0.6996888224659922, 'kbb': 126.26882930476437, 'mua': 0.49939894255688555, 'mub': 0.6586702772927231, 'd_B': 8.65380960982406, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 0.68858169, 250.85811902]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.04685998948372605+0j), 'complex_dispersion': True}
negative
48%|████▊ | 15/31 [03:04<03:14, 12.17s/it]
1271426.4
{'ba': 0.01, 'bb': 0.01, 'Va': 190.22562841368324, 'Vb': 293.57445146053476, 'kaa': 6.800965172133764, 'kba': 0.2207350784378043, 'kab': 246.46224222918642, 'kbb': 0.3525542163110288, 'mua': 0.05496767705865642, 'mub': 0.006625831542775947, 'd_B': 7.974703275984807, 'd_A': 1.0, 'n': 2.0, 'ss_n': 6.0, 'ss_list': array([0.41344634, 1.62368288]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0014508345841911796+0j), 'complex_dispersion': True}
negative
52%|█████▏ | 16/31 [03:17<03:06, 12.44s/it]
1282460.3
{'ba': 0.01, 'bb': 0.01, 'Va': 137.40868705731026, 'Vb': 46.23022959713599, 'kaa': 4.385335909142999, 'kba': 22.875973534242117, 'kab': 0.2523078622811597, 'kbb': 0.7088325932748427, 'mua': 0.6043877303369629, 'mub': 0.5952921481552054, 'd_B': 7.041691131306341, 'd_A': 1.0, 'n': 2.0, 'ss_n': 6.0, 'ss_list': array([ 0.18338943, 26.86238075]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.05459776834667229+0j), 'complex_dispersion': True}
55%|█████▍ | 17/31 [03:30<02:55, 12.56s/it]
1363184.1
{'ba': 0.01, 'bb': 0.01, 'Va': 489.8671005258825, 'Vb': 792.6915956318819, 'kaa': 23.23039953009945, 'kba': 8.414381315042213, 'kab': 44.27483619151162, 'kbb': 60.43230607871443, 'mua': 4.384668940225246, 'mub': 4.435087240485868, 'd_B': 8.081678478090167, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([8.33716782, 6.12283299]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.3926141426465968+0j), 'complex_dispersion': True}
negative
58%|█████▊ | 18/31 [03:46<02:56, 13.59s/it]
1365378.2
{'ba': 0.01, 'bb': 0.01, 'Va': 47.893378801210034, 'Vb': 303.5862850568044, 'kaa': 12.846916651306918, 'kba': 59.29856210446242, 'kab': 4.40650368007774, 'kbb': 2.4980566368646926, 'mua': 0.17139154270706858, 'mub': 0.2410507179492761, 'd_B': 4.899399859365768, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.79077203, 39.33513345]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0023076793524887673+0j), 'complex_dispersion': True}
61%|██████▏ | 19/31 [04:01<02:48, 14.03s/it]
1511110.2
{'ba': 0.01, 'bb': 0.01, 'Va': 197.01617697598112, 'Vb': 14.839225143838895, 'kaa': 21.290596844116017, 'kba': 70.58163906952495, 'kab': 1.5274893270274876, 'kbb': 213.0615544604696, 'mua': 0.02646202856244844, 'mub': 0.022356226626566965, 'd_B': 6.5775044835814525, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 2.45236646, 478.67726623]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0031422137425548696+0j), 'complex_dispersion': True}
65%|██████▍ | 20/31 [04:19<02:47, 15.19s/it]
1591223.2
{'ba': 0.01, 'bb': 0.01, 'Va': 181.44888622132726, 'Vb': 124.23883449762988, 'kaa': 1.9077517466192115, 'kba': 0.9491899474542316, 'kab': 1.236091786253191, 'kbb': 0.7330658560779242, 'mua': 8.468121211484974, 'mub': 8.174363578560122, 'd_B': 4.305125014827109, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.28267662, 0.75656438]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.281755258396565+0j), 'complex_dispersion': True}
68%|██████▊ | 21/31 [04:31<02:21, 14.12s/it]
1690913.2
{'ba': 0.01, 'bb': 0.01, 'Va': 352.7320005286167, 'Vb': 181.5972063730003, 'kaa': 22.845293171242496, 'kba': 169.51933721889947, 'kab': 1.3244300604518457, 'kbb': 0.3287189111431211, 'mua': 0.2841278375986933, 'mub': 0.2722956078114015, 'd_B': 9.110463685725591, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 0.71352878, 150.06077262]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0850329728032928+0j), 'complex_dispersion': True}
negative
71%|███████ | 22/31 [04:42<01:58, 13.19s/it]
1695603.2
{'ba': 0.01, 'bb': 0.01, 'Va': 31.97744639010365, 'Vb': 355.74700225932463, 'kaa': 0.5949376437041896, 'kba': 0.1548002535733322, 'kab': 3.0446652198761677, 'kbb': 0.19553009847235556, 'mua': 7.723634366609317, 'mub': 7.413257117473428, 'd_B': 8.454430875350083, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.16170534, 0.13633008]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.6959259882071223+0j), 'complex_dispersion': True}
negative
74%|███████▍ | 23/31 [04:53<01:40, 12.53s/it]
1706579.2
{'ba': 0.01, 'bb': 0.01, 'Va': 59.65913434905526, 'Vb': 58.37513321525424, 'kaa': 19.49110411915976, 'kba': 58.35774236702684, 'kab': 3.4847416149037334, 'kbb': 203.24584674616693, 'mua': 0.08457531491226752, 'mub': 0.07481531387993656, 'd_B': 9.425369788961964, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 1.02808973, 62.60937462]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0047861200244455615+0j), 'complex_dispersion': True}
negative
77%|███████▋ | 24/31 [05:04<01:24, 12.07s/it]
1710204.2
{'ba': 0.01, 'bb': 0.01, 'Va': 216.47211636902944, 'Vb': 83.96995474560133, 'kaa': 13.679493144396407, 'kba': 3.4999455377566093, 'kab': 12.575575628343543, 'kbb': 14.762696556376671, 'mua': 3.986566405021081, 'mub': 6.215158423693362, 'd_B': 7.634227219284631, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([5.23818164, 1.99913804]), 'ss_class': 'stable point', 'system_class': 'turing I', 'maxeig': (0.5528654870556391+0j), 'complex_dispersion': False}
negative
81%|████████ | 25/31 [05:15<01:10, 11.76s/it]
1808247.2
{'ba': 0.01, 'bb': 0.01, 'Va': 115.56024514084763, 'Vb': 388.29979364710476, 'kaa': 6.223902031641141, 'kba': 2.5766935598568312, 'kab': 12.162629164481306, 'kbb': 66.47320647479549, 'mua': 2.598519397485629, 'mub': 2.727407326346441, 'd_B': 6.89360915836798, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([1.41924552, 1.91617636]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.3801366210914452+0j), 'complex_dispersion': True}
84%|████████▍ | 26/31 [05:26<00:57, 11.52s/it]
1809921.2
{'ba': 0.01, 'bb': 0.01, 'Va': 63.3691018173114, 'Vb': 364.64271636876924, 'kaa': 3.141309596623848, 'kba': 138.10754774972156, 'kab': 0.5698650306238873, 'kbb': 1.727839717663489, 'mua': 0.6103431019026028, 'mub': 0.6230432044735008, 'd_B': 6.612335350387968, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.64775478, 329.93235774]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.05649640258731825+0j), 'complex_dispersion': True}
87%|████████▋ | 27/31 [05:37<00:45, 11.35s/it]
1814923.2
{'ba': 0.01, 'bb': 0.01, 'Va': 53.56055927437798, 'Vb': 13.54273573117521, 'kaa': 2.373041388976948, 'kba': 1.1604487885770782, 'kab': 0.8192073670062823, 'kbb': 1.5034720703746312, 'mua': 2.4032596628365006, 'mub': 2.9870937016665025, 'd_B': 7.673754531362256, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.38006234, 0.80634261]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.7280681395694426+0j), 'complex_dispersion': True}
negative
90%|█████████ | 28/31 [05:48<00:33, 11.27s/it]
1826994.2
{'ba': 0.01, 'bb': 0.01, 'Va': 41.291370463081314, 'Vb': 10.931651652967993, 'kaa': 8.881407254967614, 'kba': 0.5957948694497539, 'kab': 18.624381839430516, 'kbb': 0.23540646060770318, 'mua': 1.2075381545788222, 'mub': 1.2521407267897737, 'd_B': 8.378671879819821, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([4.05409146, 0.40294386]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.018427239301447518+0j), 'complex_dispersion': True}
negative
94%|█████████▎| 29/31 [05:59<00:22, 11.14s/it]
1869288.0
{'ba': 0.01, 'bb': 0.01, 'Va': 727.246993009074, 'Vb': 34.30308217612897, 'kaa': 4.047834669345688, 'kba': 1.4697684317594815, 'kab': 0.2123372822054281, 'kbb': 1.2004593182769858, 'mua': 1.2932608263221428, 'mub': 0.8170943519827769, 'd_B': 9.67518351441563, 'd_A': 1.0, 'n': 2.0, 'ss_n': 1.0, 'ss_list': array([0.03357005, 1.03598035]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.1400827771050075+0j), 'complex_dispersion': True}
negative
97%|█████████▋| 30/31 [06:09<00:11, 11.06s/it]
1874504.1
{'ba': 0.01, 'bb': 0.01, 'Va': 122.94933403153534, 'Vb': 29.388223066040922, 'kaa': 27.486707820855447, 'kba': 26.80106743743048, 'kab': 4.632377342389826, 'kbb': 5.63766610052431, 'mua': 0.21246309976977518, 'mub': 0.272714419860516, 'd_B': 9.238315564038194, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 2.79687796, 28.82539555]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.037788252039048675+0j), 'complex_dispersion': True}
negative
100%|██████████| 31/31 [06:20<00:00, 12.29s/it]
import sys
import os
from importlib_metadata import distribution
pwd = os.getcwd()
modellingpath = pwd.rpartition("modelling")[0] + pwd.rpartition("modelling")[1]
sys.path.append(modellingpath + '/lib')
#############
from numerical.cn_edgegrowth2_numba import cn_edgegrowth2 as cn_edgegrowth2_numba
from numerical.cn_edgegrowth2 import cn_edgegrowth2
from numerical.cn_nogrowth import cn_nogrowth
from numerical.cn_plot import plot1D, surfpattern
import pickle
import matplotlib.pyplot as plt
import time
import numpy as np
from tqdm import tqdm
#system parameters
circuit_n = 'turinghill'
variant=0
n_param_sets = 2000000
# par_dict = {'c1':0.1, 'c2':1,'c3':0.9,'c4':1, 'd_A': 1, 'd_B':10}
df= pickle.load( open(modellingpath + "/growth/out/analytical/turing/turing_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
# df= pickle.load( open(modellingpath + "/growth/out/analytical/instability/instability_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
df.index.names = ['parID','ss']
# df = multiple_df.xs(0, level=1)
#solver parameters
L=50; x_gridpoints=1; J=L*x_gridpoints;I=J
T=3000; t_gridpoints = 5; N=T*t_gridpoints #Number of timepoints <below 3 is bad if x_gridpoints=1
boundaryCoeff=2;rate=0.01
print(len(df))
filename= lambda mechanism, parID: 'circuit%s_variant%s_bc%s_%s_rate%s_ID%s_L%r_J%r_T%r_N%r'%(circuit_n,variant,boundaryCoeff, mechanism,rate,parID,L,J,T,N)
for parID,ss in tqdm(df.index):
parIDss = f'{parID}.{ss}'
print(parIDss)
mechanism = 'edgegrowth2'
par_dict = df.loc[(parID,ss)].to_dict()
print(par_dict)
U_final,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=rate, boundaryCoeff=boundaryCoeff, tqdm_disable=True)
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
plot1D(U_final)
plt.show()
mechanism = 'nogrowth'
U_final,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=True)
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
plt.show()
plot1D(U_final)
plt.show()
# #run
# no_numba = False
# if no_numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time numba:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# plt.scatter(x_grid,cellMatrix)
# plt.show()
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# numba=False
# if numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# no_growth = True
# if no_growth == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=False)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# print(np.sum(U_final[0]))
0%| | 0/31 [00:00<?, ?it/s]
31
118941.0
{'ba': 0.01, 'bb': 0.01, 'Va': 815.2281990625947, 'Vb': 869.092720545832, 'kaa': 12.891931764200102, 'kba': 42.952283653646234, 'kab': 1.6989749233704032, 'kbb': 184.85059192663672, 'mua': 1.2913151609791507, 'mub': 1.3882435185207276, 'd_B': 9.871792232811737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.36781896, 28.03584002]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.5281387272214166+0j), 'complex_dispersion': True}
negative
3%|▎ | 1/31 [00:04<02:02, 4.10s/it]
130517.2
{'ba': 0.01, 'bb': 0.01, 'Va': 114.2943824225333, 'Vb': 135.5191790082118, 'kaa': 31.039471979008834, 'kba': 8.382989354562715, 'kab': 23.895203185186315, 'kbb': 0.680626361413112, 'mua': 0.10629343462009974, 'mub': 0.09833370115985028, 'd_B': 8.061394127036298, 'd_A': 1.0, 'n': 2.0, 'ss_n': 4.0, 'ss_list': array([1.99812735, 9.67041749]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.002129146044943686+0j), 'complex_dispersion': True}
negative
6%|▋ | 2/31 [00:07<01:56, 4.02s/it]
135128.1
{'ba': 0.01, 'bb': 0.01, 'Va': 27.564908966425694, 'Vb': 326.25772039061815, 'kaa': 1.7568405193731178, 'kba': 1.4857913308384587, 'kab': 3.6312436959757273, 'kbb': 58.459387568413824, 'mua': 1.5994924753282964, 'mub': 1.819611424644346, 'd_B': 8.272981979622703, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.29640735, 1.19224465]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.23246594566876855+0j), 'complex_dispersion': True}
negative
10%|▉ | 3/31 [00:11<01:51, 3.96s/it]
350981.4
{'ba': 0.01, 'bb': 0.01, 'Va': 239.16045466671721, 'Vb': 34.63637728615317, 'kaa': 36.2339505371141, 'kba': 64.48723450348534, 'kab': 2.2029491724002734, 'kbb': 3.8503227579228367, 'mua': 0.176897911154491, 'mub': 0.21967063862747171, 'd_B': 9.765606067430125, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 1.51834334, 50.82511564]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.06622513286767573+0j), 'complex_dispersion': True}
negative
13%|█▎ | 4/31 [00:15<01:45, 3.90s/it]
351953.1
{'ba': 0.01, 'bb': 0.01, 'Va': 54.18484104015259, 'Vb': 47.25741550983462, 'kaa': 11.605058993398924, 'kba': 33.85514282492236, 'kab': 4.32564142907592, 'kbb': 57.999664182403706, 'mua': 0.408073564739178, 'mub': 0.4027145677064975, 'd_B': 8.87692980159737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 3.98772768, 53.936696 ]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.028127901418268264+0j), 'complex_dispersion': True}
negative
16%|█▌ | 5/31 [00:19<01:41, 3.91s/it]
360416.1
{'ba': 0.01, 'bb': 0.01, 'Va': 385.5088897168174, 'Vb': 110.22121523587622, 'kaa': 2.483706697966257, 'kba': 0.9711051957031617, 'kab': 0.40104277427424595, 'kbb': 42.103036140718736, 'mua': 5.250474461283016, 'mub': 14.083381020752846, 'd_B': 7.772167659674627, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.12386348, 0.68225491]), 'ss_class': 'stable point', 'system_class': 'turing I', 'maxeig': (0.17701025304920037+0j), 'complex_dispersion': False}
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) ~/Documents/modelling/growth/src/numerical/edgegrowth2/run_numerical_multiple.py in <module> 47 par_dict = df.loc[(parID,ss)].to_dict() 48 print(par_dict) ---> 49 U_final,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=rate, boundaryCoeff=boundaryCoeff, tqdm_disable=True) 50 pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb')) 51 pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb')) ~/Documents/modelling/lib/numerical/cn_edgegrowth2_numba.py in cn_edgegrowth2(par_dict, L, J, T, N, circuit_n, steadystate, growth, rate, n_species, perturbation, boundaryCoeff, tqdm_disable) 61 return cellMatrix 62 initialJ=1 ---> 63 cellMatrix=cellMatrixFunction(initialJ) 64 65 U0 = [] /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_for_args(self, *args, **kws) 432 return_val = None 433 try: --> 434 return_val = self.compile(tuple(argtypes)) 435 except errors.ForceLiteralArg as e: 436 # Received request for compiler re-entry with the list of arguments /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, sig) 977 with ev.trigger_event("numba:compile", data=ev_details): 978 try: --> 979 cres = self._compiler.compile(args, return_type) 980 except errors.ForceLiteralArg as e: 981 def folded(args, kws): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, args, return_type) 139 140 def compile(self, args, return_type): --> 141 status, retval = self._compile_cached(args, return_type) 142 if status: 143 return retval /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_cached(self, args, return_type) 153 154 try: --> 155 retval = self._compile_core(args, return_type) 156 except errors.TypingError as e: 157 self._failed_cache[key] = e /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_core(self, args, return_type) 166 167 impl = self._get_implementation(args, {}) --> 168 cres = compiler.compile_extra(self.targetdescr.typing_context, 169 self.targetdescr.target_context, 170 impl, /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class) 684 pipeline = pipeline_class(typingctx, targetctx, library, 685 args, return_type, flags, locals) --> 686 return pipeline.compile_extra(func) 687 688 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(self, func) 426 self.state.lifted = () 427 self.state.lifted_from = None --> 428 return self._compile_bytecode() 429 430 def compile_ir(self, func_ir, lifted=(), lifted_from=None): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler.py in _compile_bytecode(self) 490 """ 491 assert self.state.func_ir is None --> 492 return self._compile_core() 493 494 def _compile_ir(self): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler.py in _compile_core(self) 460 res = None 461 try: --> 462 pm.run(self.state) 463 if self.state.cr is not None: 464 break /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler_machinery.py in run(self, state) 332 pass_inst = _pass_registry.get(pss).pass_inst 333 if isinstance(pass_inst, CompilerPass): --> 334 self._runPass(idx, pass_inst, state) 335 else: 336 raise BaseException("Legacy pass in use") /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler_lock.py in _acquire_compile_lock(*args, **kwargs) 33 def _acquire_compile_lock(*args, **kwargs): 34 with self: ---> 35 return func(*args, **kwargs) 36 return _acquire_compile_lock 37 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler_machinery.py in _runPass(self, index, pss, internal_state) 287 mutated |= check(pss.run_initialization, internal_state) 288 with SimpleTimer() as pass_time: --> 289 mutated |= check(pss.run_pass, internal_state) 290 with SimpleTimer() as finalize_time: 291 mutated |= check(pss.run_finalizer, internal_state) /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler_machinery.py in check(func, compiler_state) 260 261 def check(func, compiler_state): --> 262 mangled = func(compiler_state) 263 if mangled not in (True, False): 264 msg = ("CompilerPass implementations should return True/False. " /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/typed_passes.py in run_pass(self, state) 423 # Insert native function for use by other jitted-functions. 424 # We also register its library to allow for inlining. --> 425 cfunc = targetctx.get_executable(library, fndesc, env) 426 targetctx.insert_user_function(cfunc, fndesc, [library]) 427 state['cr'] = _LowerResult(fndesc, call_helper, /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/cpu.py in get_executable(self, library, fndesc, env) 228 """ 229 # Code generation --> 230 baseptr = library.get_pointer_to_function(fndesc.llvm_func_name) 231 fnptr = library.get_pointer_to_function(fndesc.llvm_cpython_wrapper_name) 232 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/codegen.py in get_pointer_to_function(self, name) 986 - non-zero if the symbol is defined. 987 """ --> 988 self._ensure_finalized() 989 ee = self._codegen._engine 990 if not ee.is_symbol_defined(name): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/codegen.py in _ensure_finalized(self) 566 def _ensure_finalized(self): 567 if not self._finalized: --> 568 self.finalize() 569 570 def create_ir_module(self, name): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/codegen.py in finalize(self) 761 # Optimize the module after all dependences are linked in above, 762 # to allow for inlining. --> 763 self._optimize_final_module() 764 765 self._final_module.verify() /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/codegen.py in _optimize_final_module(self) 681 with self._recorded_timings.record(full_name): 682 # The full optimisation suite is then run on the refop pruned IR --> 683 self._codegen._mpm_full.run(self._final_module) 684 685 def _get_module_for_linking(self): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/llvmlite/binding/passmanagers.py in run(self, module) 205 Run optimization passes on the given module. 206 """ --> 207 return ffi.lib.LLVMPY_RunPassManager(self, module) 208 209 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/llvmlite/binding/ffi.py in __call__(self, *args, **kwargs) 149 def __call__(self, *args, **kwargs): 150 with self._lock: --> 151 return self._cfn(*args, **kwargs) 152 153 KeyboardInterrupt:
import sys
import os
from importlib_metadata import distribution
pwd = os.getcwd()
modellingpath = pwd.rpartition("modelling")[0] + pwd.rpartition("modelling")[1]
sys.path.append(modellingpath + '/lib')
#############
from numerical.cn_edgegrowth2_numba import cn_edgegrowth2 as cn_edgegrowth2_numba
from numerical.cn_edgegrowth2 import cn_edgegrowth2
from numerical.cn_nogrowth import cn_nogrowth
from numerical.cn_plot import plot1D, surfpattern
import pickle
import matplotlib.pyplot as plt
import time
import numpy as np
from tqdm import tqdm
#system parameters
circuit_n = 'turinghill'
variant=0
n_param_sets = 2000000
# par_dict = {'c1':0.1, 'c2':1,'c3':0.9,'c4':1, 'd_A': 1, 'd_B':10}
df= pickle.load( open(modellingpath + "/growth/out/analytical/turing/turing_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
# df= pickle.load( open(modellingpath + "/growth/out/analytical/instability/instability_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
df.index.names = ['parID','ss']
# df = multiple_df.xs(0, level=1)
#solver parameters
L=50; x_gridpoints=1; J=L*x_gridpoints;I=J
T=3000; t_gridpoints = 5; N=T*t_gridpoints #Number of timepoints <below 3 is bad if x_gridpoints=1
boundaryCoeff=2;rate=0.01
print(len(df))
filename= lambda mechanism, parID: 'circuit%s_variant%s_bc%s_%s_rate%s_ID%s_L%r_J%r_T%r_N%r'%(circuit_n,variant,boundaryCoeff, mechanism,rate,parID,L,J,T,N)
for parID,ss in tqdm(df.index):
parIDss = f'{parID}.{ss}'
print(parIDss)
mechanism = 'edgegrowth2'
par_dict = df.loc[(parID,ss)].to_dict()
print(par_dict)
U_final,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=rate, boundaryCoeff=boundaryCoeff, tqdm_disable=True)
surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
plt.show()
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
plot1D(U_final)
plt.show()
mechanism = 'nogrowth'
U_final,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=True)
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
plt.show()
plot1D(U_final)
plt.show()
# #run
# no_numba = False
# if no_numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time numba:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# plt.scatter(x_grid,cellMatrix)
# plt.show()
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# numba=False
# if numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# no_growth = True
# if no_growth == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=False)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# print(np.sum(U_final[0]))
0%| | 0/31 [00:00<?, ?it/s]
31
118941.0
{'ba': 0.01, 'bb': 0.01, 'Va': 815.2281990625947, 'Vb': 869.092720545832, 'kaa': 12.891931764200102, 'kba': 42.952283653646234, 'kab': 1.6989749233704032, 'kbb': 184.85059192663672, 'mua': 1.2913151609791507, 'mub': 1.3882435185207276, 'd_B': 9.871792232811737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.36781896, 28.03584002]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.5281387272214166+0j), 'complex_dispersion': True}
negative
3%|▎ | 1/31 [00:04<02:04, 4.14s/it]
130517.2
{'ba': 0.01, 'bb': 0.01, 'Va': 114.2943824225333, 'Vb': 135.5191790082118, 'kaa': 31.039471979008834, 'kba': 8.382989354562715, 'kab': 23.895203185186315, 'kbb': 0.680626361413112, 'mua': 0.10629343462009974, 'mub': 0.09833370115985028, 'd_B': 8.061394127036298, 'd_A': 1.0, 'n': 2.0, 'ss_n': 4.0, 'ss_list': array([1.99812735, 9.67041749]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.002129146044943686+0j), 'complex_dispersion': True}
negative
6%|▋ | 2/31 [00:08<02:01, 4.19s/it]
135128.1
{'ba': 0.01, 'bb': 0.01, 'Va': 27.564908966425694, 'Vb': 326.25772039061815, 'kaa': 1.7568405193731178, 'kba': 1.4857913308384587, 'kab': 3.6312436959757273, 'kbb': 58.459387568413824, 'mua': 1.5994924753282964, 'mub': 1.819611424644346, 'd_B': 8.272981979622703, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.29640735, 1.19224465]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.23246594566876855+0j), 'complex_dispersion': True}
negative
10%|▉ | 3/31 [00:12<01:55, 4.11s/it]
350981.4
{'ba': 0.01, 'bb': 0.01, 'Va': 239.16045466671721, 'Vb': 34.63637728615317, 'kaa': 36.2339505371141, 'kba': 64.48723450348534, 'kab': 2.2029491724002734, 'kbb': 3.8503227579228367, 'mua': 0.176897911154491, 'mub': 0.21967063862747171, 'd_B': 9.765606067430125, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 1.51834334, 50.82511564]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.06622513286767573+0j), 'complex_dispersion': True}
negative
13%|█▎ | 4/31 [00:16<01:49, 4.07s/it]
351953.1
{'ba': 0.01, 'bb': 0.01, 'Va': 54.18484104015259, 'Vb': 47.25741550983462, 'kaa': 11.605058993398924, 'kba': 33.85514282492236, 'kab': 4.32564142907592, 'kbb': 57.999664182403706, 'mua': 0.408073564739178, 'mub': 0.4027145677064975, 'd_B': 8.87692980159737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 3.98772768, 53.936696 ]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.028127901418268264+0j), 'complex_dispersion': True}
negative
16%|█▌ | 5/31 [00:20<01:46, 4.11s/it]
360416.1
{'ba': 0.01, 'bb': 0.01, 'Va': 385.5088897168174, 'Vb': 110.22121523587622, 'kaa': 2.483706697966257, 'kba': 0.9711051957031617, 'kab': 0.40104277427424595, 'kbb': 42.103036140718736, 'mua': 5.250474461283016, 'mub': 14.083381020752846, 'd_B': 7.772167659674627, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.12386348, 0.68225491]), 'ss_class': 'stable point', 'system_class': 'turing I', 'maxeig': (0.17701025304920037+0j), 'complex_dispersion': False}
negative
negative
negative
19%|█▉ | 6/31 [00:24<01:41, 4.07s/it]
472883.2
{'ba': 0.01, 'bb': 0.01, 'Va': 290.6327418040253, 'Vb': 11.45621109841897, 'kaa': 14.439605207063384, 'kba': 0.7407539897652289, 'kab': 8.226865404352063, 'kbb': 160.62343879687893, 'mua': 3.3465368714702333, 'mub': 3.9901290059736207, 'd_B': 6.620820479626943, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([3.94695606, 0.5397153 ]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.5550199052762483+0j), 'complex_dispersion': True}
23%|██▎ | 7/31 [00:28<01:36, 4.04s/it]
486068.2
{'ba': 0.01, 'bb': 0.01, 'Va': 997.2903282608314, 'Vb': 43.111126294326105, 'kaa': 155.8052786664667, 'kba': 5.559437646546131, 'kab': 17.475798599213125, 'kbb': 0.11000134341052847, 'mua': 0.048235757764698135, 'mub': 0.0802045896337645, 'd_B': 7.693765988716828, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([1.36567456, 3.38727262]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0021226246628133216+0j), 'complex_dispersion': True}
negative
26%|██▌ | 8/31 [00:32<01:32, 4.04s/it]
546109.1
{'ba': 0.01, 'bb': 0.01, 'Va': 202.03958750174837, 'Vb': 34.49501460261308, 'kaa': 3.375462276950734, 'kba': 20.057786219077514, 'kab': 0.4415101363086828, 'kbb': 37.15703655950709, 'mua': 0.18011977945255836, 'mub': 0.14115099075969806, 'd_B': 5.773968725763372, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.59267954, 157.23763183]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.013721466808561122+0j), 'complex_dispersion': True}
29%|██▉ | 9/31 [00:36<01:28, 4.04s/it]
742006.2
{'ba': 0.01, 'bb': 0.01, 'Va': 115.40492671282917, 'Vb': 35.75298038735518, 'kaa': 2.3843297731692674, 'kba': 3.9720414027865862, 'kab': 0.22270580063721748, 'kbb': 2.4367359875485, 'mua': 1.1586282735305444, 'mub': 1.2757264967083521, 'd_B': 5.211852873994694, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.0676013 , 2.37223273]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.16226784711775366+0j), 'complex_dispersion': True}
32%|███▏ | 10/31 [00:40<01:24, 4.01s/it]
862004.2
{'ba': 0.01, 'bb': 0.01, 'Va': 15.342934792094486, 'Vb': 754.2975569594662, 'kaa': 1.6557933391612487, 'kba': 8.439693370086474, 'kab': 6.603317355743912, 'kbb': 8.006935541273098, 'mua': 2.7471878890929213, 'mub': 2.1766960056095455, 'd_B': 6.436259387327192, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.74958926, 4.41325274]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.4247302804824109+0j), 'complex_dispersion': True}
35%|███▌ | 11/31 [00:44<01:19, 3.99s/it]
1121752.2
{'ba': 0.01, 'bb': 0.01, 'Va': 35.09596281919261, 'Vb': 42.009523487375624, 'kaa': 204.67025945320665, 'kba': 129.52996179175673, 'kab': 196.2069645904714, 'kbb': 0.2434143443237951, 'mua': 0.02061094760029868, 'mub': 0.020158654231861257, 'd_B': 7.5919466938069515, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 49.09562577, 123.28756485]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0008073348759318894+0j), 'complex_dispersion': True}
negative
39%|███▊ | 12/31 [00:48<01:15, 3.99s/it]
1133916.0
{'ba': 0.01, 'bb': 0.01, 'Va': 25.28034579814929, 'Vb': 24.820602749573567, 'kaa': 0.46665031483665004, 'kba': 2.894328309523785, 'kab': 0.17150018214289278, 'kbb': 22.58855246886253, 'mua': 2.3401280586314592, 'mub': 1.8123012418852684, 'd_B': 9.29657417053512, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.20345611, 8.01213494]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0951403612171493+0j), 'complex_dispersion': True}
negative
42%|████▏ | 13/31 [00:52<01:11, 3.95s/it]
1195022.4
{'ba': 0.01, 'bb': 0.01, 'Va': 611.4433330118857, 'Vb': 65.41842217773055, 'kaa': 3.679403701088877, 'kba': 4.9161447235193645, 'kab': 0.2918676371684259, 'kbb': 23.16548966879861, 'mua': 2.681935721389821, 'mub': 3.6395321051690397, 'd_B': 3.8688919677210523, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 0.40738494, 11.88045562]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.143157693219905+0j), 'complex_dispersion': True}
45%|████▌ | 14/31 [00:56<01:07, 3.96s/it]
1251569.4
{'ba': 0.01, 'bb': 0.01, 'Va': 78.3363322679065, 'Vb': 335.81879962648486, 'kaa': 4.829453494045339, 'kba': 130.86352922113667, 'kab': 0.6996888224659922, 'kbb': 126.26882930476437, 'mua': 0.49939894255688555, 'mub': 0.6586702772927231, 'd_B': 8.65380960982406, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 0.68858169, 250.85811902]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.04685998948372605+0j), 'complex_dispersion': True}
negative
48%|████▊ | 15/31 [01:00<01:03, 3.96s/it]
1271426.4
{'ba': 0.01, 'bb': 0.01, 'Va': 190.22562841368324, 'Vb': 293.57445146053476, 'kaa': 6.800965172133764, 'kba': 0.2207350784378043, 'kab': 246.46224222918642, 'kbb': 0.3525542163110288, 'mua': 0.05496767705865642, 'mub': 0.006625831542775947, 'd_B': 7.974703275984807, 'd_A': 1.0, 'n': 2.0, 'ss_n': 6.0, 'ss_list': array([0.41344634, 1.62368288]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0014508345841911796+0j), 'complex_dispersion': True}
negative
52%|█████▏ | 16/31 [01:04<00:59, 4.00s/it]
1282460.3
{'ba': 0.01, 'bb': 0.01, 'Va': 137.40868705731026, 'Vb': 46.23022959713599, 'kaa': 4.385335909142999, 'kba': 22.875973534242117, 'kab': 0.2523078622811597, 'kbb': 0.7088325932748427, 'mua': 0.6043877303369629, 'mub': 0.5952921481552054, 'd_B': 7.041691131306341, 'd_A': 1.0, 'n': 2.0, 'ss_n': 6.0, 'ss_list': array([ 0.18338943, 26.86238075]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.05459776834667229+0j), 'complex_dispersion': True}
55%|█████▍ | 17/31 [01:08<00:56, 4.05s/it]
1363184.1
{'ba': 0.01, 'bb': 0.01, 'Va': 489.8671005258825, 'Vb': 792.6915956318819, 'kaa': 23.23039953009945, 'kba': 8.414381315042213, 'kab': 44.27483619151162, 'kbb': 60.43230607871443, 'mua': 4.384668940225246, 'mub': 4.435087240485868, 'd_B': 8.081678478090167, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([8.33716782, 6.12283299]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.3926141426465968+0j), 'complex_dispersion': True}
negative
58%|█████▊ | 18/31 [01:12<00:52, 4.02s/it]
1365378.2
{'ba': 0.01, 'bb': 0.01, 'Va': 47.893378801210034, 'Vb': 303.5862850568044, 'kaa': 12.846916651306918, 'kba': 59.29856210446242, 'kab': 4.40650368007774, 'kbb': 2.4980566368646926, 'mua': 0.17139154270706858, 'mub': 0.2410507179492761, 'd_B': 4.899399859365768, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.79077203, 39.33513345]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0023076793524887673+0j), 'complex_dispersion': True}
61%|██████▏ | 19/31 [01:16<00:49, 4.15s/it]
1511110.2
{'ba': 0.01, 'bb': 0.01, 'Va': 197.01617697598112, 'Vb': 14.839225143838895, 'kaa': 21.290596844116017, 'kba': 70.58163906952495, 'kab': 1.5274893270274876, 'kbb': 213.0615544604696, 'mua': 0.02646202856244844, 'mub': 0.022356226626566965, 'd_B': 6.5775044835814525, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 2.45236646, 478.67726623]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0031422137425548696+0j), 'complex_dispersion': True}
65%|██████▍ | 20/31 [01:20<00:45, 4.12s/it]
1591223.2
{'ba': 0.01, 'bb': 0.01, 'Va': 181.44888622132726, 'Vb': 124.23883449762988, 'kaa': 1.9077517466192115, 'kba': 0.9491899474542316, 'kab': 1.236091786253191, 'kbb': 0.7330658560779242, 'mua': 8.468121211484974, 'mub': 8.174363578560122, 'd_B': 4.305125014827109, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.28267662, 0.75656438]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.281755258396565+0j), 'complex_dispersion': True}
68%|██████▊ | 21/31 [01:24<00:40, 4.09s/it]
1690913.2
{'ba': 0.01, 'bb': 0.01, 'Va': 352.7320005286167, 'Vb': 181.5972063730003, 'kaa': 22.845293171242496, 'kba': 169.51933721889947, 'kab': 1.3244300604518457, 'kbb': 0.3287189111431211, 'mua': 0.2841278375986933, 'mub': 0.2722956078114015, 'd_B': 9.110463685725591, 'd_A': 1.0, 'n': 2.0, 'ss_n': 5.0, 'ss_list': array([ 0.71352878, 150.06077262]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0850329728032928+0j), 'complex_dispersion': True}
negative
71%|███████ | 22/31 [01:28<00:36, 4.04s/it]
1695603.2
{'ba': 0.01, 'bb': 0.01, 'Va': 31.97744639010365, 'Vb': 355.74700225932463, 'kaa': 0.5949376437041896, 'kba': 0.1548002535733322, 'kab': 3.0446652198761677, 'kbb': 0.19553009847235556, 'mua': 7.723634366609317, 'mub': 7.413257117473428, 'd_B': 8.454430875350083, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.16170534, 0.13633008]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.6959259882071223+0j), 'complex_dispersion': True}
negative
74%|███████▍ | 23/31 [01:32<00:32, 4.06s/it]
1706579.2
{'ba': 0.01, 'bb': 0.01, 'Va': 59.65913434905526, 'Vb': 58.37513321525424, 'kaa': 19.49110411915976, 'kba': 58.35774236702684, 'kab': 3.4847416149037334, 'kbb': 203.24584674616693, 'mua': 0.08457531491226752, 'mub': 0.07481531387993656, 'd_B': 9.425369788961964, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 1.02808973, 62.60937462]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.0047861200244455615+0j), 'complex_dispersion': True}
negative
77%|███████▋ | 24/31 [01:37<00:29, 4.16s/it]
1710204.2
{'ba': 0.01, 'bb': 0.01, 'Va': 216.47211636902944, 'Vb': 83.96995474560133, 'kaa': 13.679493144396407, 'kba': 3.4999455377566093, 'kab': 12.575575628343543, 'kbb': 14.762696556376671, 'mua': 3.986566405021081, 'mub': 6.215158423693362, 'd_B': 7.634227219284631, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([5.23818164, 1.99913804]), 'ss_class': 'stable point', 'system_class': 'turing I', 'maxeig': (0.5528654870556391+0j), 'complex_dispersion': False}
negative
81%|████████ | 25/31 [01:41<00:25, 4.17s/it]
1808247.2
{'ba': 0.01, 'bb': 0.01, 'Va': 115.56024514084763, 'Vb': 388.29979364710476, 'kaa': 6.223902031641141, 'kba': 2.5766935598568312, 'kab': 12.162629164481306, 'kbb': 66.47320647479549, 'mua': 2.598519397485629, 'mub': 2.727407326346441, 'd_B': 6.89360915836798, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([1.41924552, 1.91617636]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.3801366210914452+0j), 'complex_dispersion': True}
84%|████████▍ | 26/31 [01:45<00:21, 4.23s/it]
1809921.2
{'ba': 0.01, 'bb': 0.01, 'Va': 63.3691018173114, 'Vb': 364.64271636876924, 'kaa': 3.141309596623848, 'kba': 138.10754774972156, 'kab': 0.5698650306238873, 'kbb': 1.727839717663489, 'mua': 0.6103431019026028, 'mub': 0.6230432044735008, 'd_B': 6.612335350387968, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.64775478, 329.93235774]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.05649640258731825+0j), 'complex_dispersion': True}
87%|████████▋ | 27/31 [01:50<00:16, 4.23s/it]
1814923.2
{'ba': 0.01, 'bb': 0.01, 'Va': 53.56055927437798, 'Vb': 13.54273573117521, 'kaa': 2.373041388976948, 'kba': 1.1604487885770782, 'kab': 0.8192073670062823, 'kbb': 1.5034720703746312, 'mua': 2.4032596628365006, 'mub': 2.9870937016665025, 'd_B': 7.673754531362256, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([0.38006234, 0.80634261]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.7280681395694426+0j), 'complex_dispersion': True}
negative
90%|█████████ | 28/31 [01:54<00:12, 4.15s/it]
1826994.2
{'ba': 0.01, 'bb': 0.01, 'Va': 41.291370463081314, 'Vb': 10.931651652967993, 'kaa': 8.881407254967614, 'kba': 0.5957948694497539, 'kab': 18.624381839430516, 'kbb': 0.23540646060770318, 'mua': 1.2075381545788222, 'mub': 1.2521407267897737, 'd_B': 8.378671879819821, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([4.05409146, 0.40294386]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.018427239301447518+0j), 'complex_dispersion': True}
negative
94%|█████████▎| 29/31 [01:58<00:08, 4.18s/it]
1869288.0
{'ba': 0.01, 'bb': 0.01, 'Va': 727.246993009074, 'Vb': 34.30308217612897, 'kaa': 4.047834669345688, 'kba': 1.4697684317594815, 'kab': 0.2123372822054281, 'kbb': 1.2004593182769858, 'mua': 1.2932608263221428, 'mub': 0.8170943519827769, 'd_B': 9.67518351441563, 'd_A': 1.0, 'n': 2.0, 'ss_n': 1.0, 'ss_list': array([0.03357005, 1.03598035]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.1400827771050075+0j), 'complex_dispersion': True}
negative
97%|█████████▋| 30/31 [02:02<00:04, 4.20s/it]
1874504.1
{'ba': 0.01, 'bb': 0.01, 'Va': 122.94933403153534, 'Vb': 29.388223066040922, 'kaa': 27.486707820855447, 'kba': 26.80106743743048, 'kab': 4.632377342389826, 'kbb': 5.63766610052431, 'mua': 0.21246309976977518, 'mub': 0.272714419860516, 'd_B': 9.238315564038194, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 2.79687796, 28.82539555]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.037788252039048675+0j), 'complex_dispersion': True}
negative
100%|██████████| 31/31 [02:06<00:00, 4.09s/it]
import sys
import os
from importlib_metadata import distribution
pwd = os.getcwd()
modellingpath = pwd.rpartition("modelling")[0] + pwd.rpartition("modelling")[1]
sys.path.append(modellingpath + '/lib')
#############
from numerical.cn_edgegrowth2_numba import cn_edgegrowth2 as cn_edgegrowth2_numba
from numerical.cn_edgegrowth2 import cn_edgegrowth2
from numerical.cn_nogrowth import cn_nogrowth
from numerical.cn_plot import plot1D, surfpattern
import pickle
import matplotlib.pyplot as plt
import time
import numpy as np
from tqdm import tqdm
#system parameters
circuit_n = 'turinghill'
variant=0
n_param_sets = 2000000
# par_dict = {'c1':0.1, 'c2':1,'c3':0.9,'c4':1, 'd_A': 1, 'd_B':10}
df= pickle.load( open(modellingpath + "/growth/out/analytical/turing/turing_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
# df= pickle.load( open(modellingpath + "/growth/out/analytical/instability/instability_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
df.index.names = ['parID','ss']
# df = multiple_df.xs(0, level=1)
#solver parameters
L=50; x_gridpoints=1; J=L*x_gridpoints;I=J
T=3000; t_gridpoints = 5; N=T*t_gridpoints #Number of timepoints <below 3 is bad if x_gridpoints=1
boundaryCoeff=2;rate=0.01
print(len(df))
filename= lambda mechanism, parID: 'circuit%s_variant%s_bc%s_%s_rate%s_ID%s_L%r_J%r_T%r_N%r'%(circuit_n,variant,boundaryCoeff, mechanism,rate,parID,L,J,T,N)
for parID,ss in tqdm(df.index):
parIDss = f'{parID}.{ss}'
print(parIDss)
mechanism = 'edgegrowth2'
par_dict = df.loc[(parID,ss)].to_dict()
print(par_dict)
U_final,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=rate, boundaryCoeff=boundaryCoeff, tqdm_disable=True)
plt.scatter(x_grid,cellMatrix)
plt.show()
surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
plt.show()
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
plot1D(U_final)
plt.show()
mechanism = 'nogrowth'
U_final,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=True)
pickle.dump(U_final, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Dfinal_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
pickle.dump(U_record, open(modellingpath + '/growth/out/numerical/%s/%s/simulation/2Drecord_%s.pkl'%(circuit_n,mechanism,filename(mechanism,parIDss)), 'wb'))
surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
plt.show()
plot1D(U_final)
plt.show()
# #run
# no_numba = False
# if no_numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time numba:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# plt.scatter(x_grid,cellMatrix)
# plt.show()
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# numba=False
# if numba == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=0.1, boundaryCoeff=2)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# no_growth = True
# if no_growth == True:
# st = time.time()
# U,U_record, U0, x_grid, reduced_t_grid= cn_nogrowth(par_dict,L,J,T,N, circuit_n, tqdm_disable=False)
# elapsed_time = time.time() - st
# print('Execution time:', time.strftime("%H:%M:%S", time.gmtime(elapsed_time)))
# #plot
# plot1D(U, savefig=False,filename='')
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear',morphogen=0, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# surfpattern(U_record, [x_grid, reduced_t_grid], 'linear', morphogen=1, rate=0, savefig=False,filename='',logResults=False,normalize=False)
# plt.show()
# print(np.sum(U_final[0]))
0%| | 0/31 [00:00<?, ?it/s]
31
118941.0
{'ba': 0.01, 'bb': 0.01, 'Va': 815.2281990625947, 'Vb': 869.092720545832, 'kaa': 12.891931764200102, 'kba': 42.952283653646234, 'kab': 1.6989749233704032, 'kbb': 184.85059192663672, 'mua': 1.2913151609791507, 'mub': 1.3882435185207276, 'd_B': 9.871792232811737, 'd_A': 1.0, 'n': 2.0, 'ss_n': 3.0, 'ss_list': array([ 0.36781896, 28.03584002]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.5281387272214166+0j), 'complex_dispersion': True}
negative
3%|▎ | 1/31 [00:04<02:03, 4.10s/it]
130517.2
{'ba': 0.01, 'bb': 0.01, 'Va': 114.2943824225333, 'Vb': 135.5191790082118, 'kaa': 31.039471979008834, 'kba': 8.382989354562715, 'kab': 23.895203185186315, 'kbb': 0.680626361413112, 'mua': 0.10629343462009974, 'mub': 0.09833370115985028, 'd_B': 8.061394127036298, 'd_A': 1.0, 'n': 2.0, 'ss_n': 4.0, 'ss_list': array([1.99812735, 9.67041749]), 'ss_class': 'stable spiral', 'system_class': 'turing I oscillatory', 'maxeig': (0.002129146044943686+0j), 'complex_dispersion': True}
--------------------------------------------------------------------------- KeyboardInterrupt Traceback (most recent call last) ~/Documents/modelling/growth/src/numerical/edgegrowth2/run_numerical_multiple.py in <module> 47 par_dict = df.loc[(parID,ss)].to_dict() 48 print(par_dict) ---> 49 U_final,U_record, U0, x_grid, reduced_t_grid, cellMatrix= cn_edgegrowth2_numba(par_dict,L,J,T,N, circuit_n, rate=rate, boundaryCoeff=boundaryCoeff, tqdm_disable=True) 50 plt.scatter(x_grid,cellMatrix) 51 plt.show() ~/Documents/modelling/lib/numerical/cn_edgegrowth2_numba.py in cn_edgegrowth2(par_dict, L, J, T, N, circuit_n, steadystate, growth, rate, n_species, perturbation, boundaryCoeff, tqdm_disable) 61 return cellMatrix 62 initialJ=1 ---> 63 cellMatrix=cellMatrixFunction(initialJ) 64 65 U0 = [] /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_for_args(self, *args, **kws) 432 return_val = None 433 try: --> 434 return_val = self.compile(tuple(argtypes)) 435 except errors.ForceLiteralArg as e: 436 # Received request for compiler re-entry with the list of arguments /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, sig) 977 with ev.trigger_event("numba:compile", data=ev_details): 978 try: --> 979 cres = self._compiler.compile(args, return_type) 980 except errors.ForceLiteralArg as e: 981 def folded(args, kws): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, args, return_type) 139 140 def compile(self, args, return_type): --> 141 status, retval = self._compile_cached(args, return_type) 142 if status: 143 return retval /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_cached(self, args, return_type) 153 154 try: --> 155 retval = self._compile_core(args, return_type) 156 except errors.TypingError as e: 157 self._failed_cache[key] = e /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_core(self, args, return_type) 166 167 impl = self._get_implementation(args, {}) --> 168 cres = compiler.compile_extra(self.targetdescr.typing_context, 169 self.targetdescr.target_context, 170 impl, /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class) 684 pipeline = pipeline_class(typingctx, targetctx, library, 685 args, return_type, flags, locals) --> 686 return pipeline.compile_extra(func) 687 688 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(self, func) 422 def compile_extra(self, func): 423 self.state.func_id = bytecode.FunctionIdentity.from_function(func) --> 424 ExtractByteCode().run_pass(self.state) 425 426 self.state.lifted = () /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/untyped_passes.py in run_pass(self, state) 62 """ 63 func_id = state['func_id'] ---> 64 bc = bytecode.ByteCode(func_id) 65 if config.DUMP_BYTECODE: 66 print(bc.dump()) /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/bytecode.py in __init__(self, func_id) 196 197 # A map of {offset: ByteCodeInst} --> 198 table = OrderedDict(ByteCodeIter(code)) 199 self._compute_lineno(table, code) 200 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/bytecode.py in next(self) 168 169 def next(self): --> 170 offset, opcode, arg, nextoffset = self._fetch_opcode() 171 return offset, ByteCodeInst(offset=offset, opcode=opcode, arg=arg, 172 nextoffset=nextoffset) /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/bytecode.py in _fetch_opcode(self) 165 166 def _fetch_opcode(self): --> 167 return next(self.iter) 168 169 def next(self): /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/bytecode.py in _patched_opargs(bc_stream) 149 yield (0, OPCODE_NOP, None, _FIXED_OFFSET) 150 # Adjust bytecode offset for the rest of the stream --> 151 for offset, opcode, arg, nextoffset in bc_stream: 152 # If the opcode has an absolute jump target, adjust it. 153 if opcode in JABS_OPS: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numba/core/bytecode.py in _unpack_opargs(code) 125 i += CODE_LEN 126 if op >= HAVE_ARGUMENT: --> 127 arg = code[i] | extended_arg 128 for j in range(ARG_LEN): 129 arg |= code[i + j] << (8 * j) KeyboardInterrupt:
df
| ba | bb | Va | Vb | kaa | kba | kab | kbb | mua | mub | d_B | d_A | n | ss_n | ss_list | ss_class | system_class | maxeig | complex_dispersion | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| parID | ss | |||||||||||||||||||
| 118941 | 0 | 0.01 | 0.01 | 815.228199 | 869.092721 | 12.891932 | 42.952284 | 1.698975 | 184.850592 | 1.291315 | 1.388244 | 9.871792 | 1.0 | 2.0 | 3.0 | [0.3678189590545821, 28.035840015553944] | stable spiral | turing I oscillatory | 0.528139+0.000000j | True |
| 130517 | 2 | 0.01 | 0.01 | 114.294382 | 135.519179 | 31.039472 | 8.382989 | 23.895203 | 0.680626 | 0.106293 | 0.098334 | 8.061394 | 1.0 | 2.0 | 4.0 | [1.9981273546814948, 9.670417490187942] | stable spiral | turing I oscillatory | 0.002129+0.000000j | True |
| 135128 | 1 | 0.01 | 0.01 | 27.564909 | 326.25772 | 1.756841 | 1.485791 | 3.631244 | 58.459388 | 1.599492 | 1.819611 | 8.272982 | 1.0 | 2.0 | 3.0 | [0.2964073513214895, 1.1922446532071926] | stable spiral | turing I oscillatory | 0.232466+0.000000j | True |
| 350981 | 4 | 0.01 | 0.01 | 239.160455 | 34.636377 | 36.233951 | 64.487235 | 2.202949 | 3.850323 | 0.176898 | 0.219671 | 9.765606 | 1.0 | 2.0 | 5.0 | [1.5183433404147844, 50.82511564321475] | stable spiral | turing I oscillatory | 0.066225+0.000000j | True |
| 351953 | 1 | 0.01 | 0.01 | 54.184841 | 47.257416 | 11.605059 | 33.855143 | 4.325641 | 57.999664 | 0.408074 | 0.402715 | 8.87693 | 1.0 | 2.0 | 3.0 | [3.9877276826980332, 53.93669600164983] | stable spiral | turing I oscillatory | 0.028128+0.000000j | True |
| 360416 | 1 | 0.01 | 0.01 | 385.50889 | 110.221215 | 2.483707 | 0.971105 | 0.401043 | 42.103036 | 5.250474 | 14.083381 | 7.772168 | 1.0 | 2.0 | 3.0 | [0.12386347936019793, 0.6822549113494273] | stable point | turing I | 0.177010+0.000000j | False |
| 472883 | 2 | 0.01 | 0.01 | 290.632742 | 11.456211 | 14.439605 | 0.740754 | 8.226865 | 160.623439 | 3.346537 | 3.990129 | 6.62082 | 1.0 | 2.0 | 3.0 | [3.946956059941068, 0.539715295276271] | stable spiral | turing I oscillatory | 0.555020+0.000000j | True |
| 486068 | 2 | 0.01 | 0.01 | 997.290328 | 43.111126 | 155.805279 | 5.559438 | 17.475799 | 0.110001 | 0.048236 | 0.080205 | 7.693766 | 1.0 | 2.0 | 3.0 | [1.3656745565250377, 3.387272620199473] | stable spiral | turing I oscillatory | 0.002123+0.000000j | True |
| 546109 | 1 | 0.01 | 0.01 | 202.039588 | 34.495015 | 3.375462 | 20.057786 | 0.44151 | 37.157037 | 0.18012 | 0.141151 | 5.773969 | 1.0 | 2.0 | 3.0 | [0.5926795355799822, 157.23763183456734] | stable spiral | turing I oscillatory | 0.013721+0.000000j | True |
| 742006 | 2 | 0.01 | 0.01 | 115.404927 | 35.75298 | 2.38433 | 3.972041 | 0.222706 | 2.436736 | 1.158628 | 1.275726 | 5.211853 | 1.0 | 2.0 | 3.0 | [0.06760130262009373, 2.372232733681772] | stable spiral | turing I oscillatory | 0.162268+0.000000j | True |
| 862004 | 2 | 0.01 | 0.01 | 15.342935 | 754.297557 | 1.655793 | 8.439693 | 6.603317 | 8.006936 | 2.747188 | 2.176696 | 6.436259 | 1.0 | 2.0 | 3.0 | [0.7495892598619592, 4.413252742068436] | stable spiral | turing I oscillatory | 0.424730+0.000000j | True |
| 1121752 | 2 | 0.01 | 0.01 | 35.095963 | 42.009523 | 204.670259 | 129.529962 | 196.206965 | 0.243414 | 0.020611 | 0.020159 | 7.591947 | 1.0 | 2.0 | 3.0 | [49.09562577313732, 123.28756484848293] | stable spiral | turing I oscillatory | 0.000807+0.000000j | True |
| 1133916 | 0 | 0.01 | 0.01 | 25.280346 | 24.820603 | 0.46665 | 2.894328 | 0.1715 | 22.588552 | 2.340128 | 1.812301 | 9.296574 | 1.0 | 2.0 | 3.0 | [0.2034561068203429, 8.012134944940739] | stable spiral | turing I oscillatory | 0.095140+0.000000j | True |
| 1195022 | 4 | 0.01 | 0.01 | 611.443333 | 65.418422 | 3.679404 | 4.916145 | 0.291868 | 23.16549 | 2.681936 | 3.639532 | 3.868892 | 1.0 | 2.0 | 5.0 | [0.4073849406238525, 11.880455617100312] | stable spiral | turing I oscillatory | 0.143158+0.000000j | True |
| 1251569 | 4 | 0.01 | 0.01 | 78.336332 | 335.8188 | 4.829453 | 130.863529 | 0.699689 | 126.268829 | 0.499399 | 0.65867 | 8.65381 | 1.0 | 2.0 | 5.0 | [0.6885816883438481, 250.8581190221953] | stable spiral | turing I oscillatory | 0.046860+0.000000j | True |
| 1271426 | 4 | 0.01 | 0.01 | 190.225628 | 293.574451 | 6.800965 | 0.220735 | 246.462242 | 0.352554 | 0.054968 | 0.006626 | 7.974703 | 1.0 | 2.0 | 6.0 | [0.4134463429492179, 1.62368287660001] | stable spiral | turing I oscillatory | 0.001451+0.000000j | True |
| 1282460 | 3 | 0.01 | 0.01 | 137.408687 | 46.23023 | 4.385336 | 22.875974 | 0.252308 | 0.708833 | 0.604388 | 0.595292 | 7.041691 | 1.0 | 2.0 | 6.0 | [0.1833894275564431, 26.86238075319138] | stable spiral | turing I oscillatory | 0.054598+0.000000j | True |
| 1363184 | 1 | 0.01 | 0.01 | 489.867101 | 792.691596 | 23.2304 | 8.414381 | 44.274836 | 60.432306 | 4.384669 | 4.435087 | 8.081678 | 1.0 | 2.0 | 3.0 | [8.337167823322593, 6.122832994581747] | stable spiral | turing I oscillatory | 0.392614+0.000000j | True |
| 1365378 | 2 | 0.01 | 0.01 | 47.893379 | 303.586285 | 12.846917 | 59.298562 | 4.406504 | 2.498057 | 0.171392 | 0.241051 | 4.8994 | 1.0 | 2.0 | 3.0 | [0.7907720328139534, 39.33513345288904] | stable spiral | turing I oscillatory | 0.002308+0.000000j | True |
| 1511110 | 2 | 0.01 | 0.01 | 197.016177 | 14.839225 | 21.290597 | 70.581639 | 1.527489 | 213.061554 | 0.026462 | 0.022356 | 6.577504 | 1.0 | 2.0 | 3.0 | [2.4523664569276242, 478.67726622832197] | stable spiral | turing I oscillatory | 0.003142+0.000000j | True |
| 1591223 | 2 | 0.01 | 0.01 | 181.448886 | 124.238834 | 1.907752 | 0.94919 | 1.236092 | 0.733066 | 8.468121 | 8.174364 | 4.305125 | 1.0 | 2.0 | 3.0 | [0.28267661915408165, 0.7565643792046686] | stable spiral | turing I oscillatory | 0.281755+0.000000j | True |
| 1690913 | 2 | 0.01 | 0.01 | 352.732001 | 181.597206 | 22.845293 | 169.519337 | 1.32443 | 0.328719 | 0.284128 | 0.272296 | 9.110464 | 1.0 | 2.0 | 5.0 | [0.7135287798621495, 150.06077262200557] | stable spiral | turing I oscillatory | 0.085033+0.000000j | True |
| 1695603 | 2 | 0.01 | 0.01 | 31.977446 | 355.747002 | 0.594938 | 0.1548 | 3.044665 | 0.19553 | 7.723634 | 7.413257 | 8.454431 | 1.0 | 2.0 | 3.0 | [0.1617053445024249, 0.1363300826977407] | stable spiral | turing I oscillatory | 0.695926+0.000000j | True |
| 1706579 | 2 | 0.01 | 0.01 | 59.659134 | 58.375133 | 19.491104 | 58.357742 | 3.484742 | 203.245847 | 0.084575 | 0.074815 | 9.42537 | 1.0 | 2.0 | 3.0 | [1.028089729998471, 62.60937462185654] | stable spiral | turing I oscillatory | 0.004786+0.000000j | True |
| 1710204 | 2 | 0.01 | 0.01 | 216.472116 | 83.969955 | 13.679493 | 3.499946 | 12.575576 | 14.762697 | 3.986566 | 6.215158 | 7.634227 | 1.0 | 2.0 | 3.0 | [5.238181642480354, 1.9991380361740079] | stable point | turing I | 0.552865+0.000000j | False |
| 1808247 | 2 | 0.01 | 0.01 | 115.560245 | 388.299794 | 6.223902 | 2.576694 | 12.162629 | 66.473206 | 2.598519 | 2.727407 | 6.893609 | 1.0 | 2.0 | 3.0 | [1.4192455159140578, 1.9161763600605481] | stable spiral | turing I oscillatory | 0.380137+0.000000j | True |
| 1809921 | 2 | 0.01 | 0.01 | 63.369102 | 364.642716 | 3.14131 | 138.107548 | 0.569865 | 1.72784 | 0.610343 | 0.623043 | 6.612335 | 1.0 | 2.0 | 3.0 | [0.6477547781387554, 329.9323577408554] | stable spiral | turing I oscillatory | 0.056496+0.000000j | True |
| 1814923 | 2 | 0.01 | 0.01 | 53.560559 | 13.542736 | 2.373041 | 1.160449 | 0.819207 | 1.503472 | 2.40326 | 2.987094 | 7.673755 | 1.0 | 2.0 | 3.0 | [0.38006233679259854, 0.8063426130688415] | stable spiral | turing I oscillatory | 0.728068+0.000000j | True |
| 1826994 | 2 | 0.01 | 0.01 | 41.29137 | 10.931652 | 8.881407 | 0.595795 | 18.624382 | 0.235406 | 1.207538 | 1.252141 | 8.378672 | 1.0 | 2.0 | 3.0 | [4.054091455041588, 0.4029438580690021] | stable spiral | turing I oscillatory | 0.018427+0.000000j | True |
| 1869288 | 0 | 0.01 | 0.01 | 727.246993 | 34.303082 | 4.047835 | 1.469768 | 0.212337 | 1.200459 | 1.293261 | 0.817094 | 9.675184 | 1.0 | 2.0 | 1.0 | [0.03357005450353577, 1.0359803479365348] | stable spiral | turing I oscillatory | 0.140083+0.000000j | True |
| 1874504 | 1 | 0.01 | 0.01 | 122.949334 | 29.388223 | 27.486708 | 26.801067 | 4.632377 | 5.637666 | 0.212463 | 0.272714 | 9.238316 | 1.0 | 2.0 | 3.0 | [2.796877956370077, 28.825395553824976] | stable spiral | turing I oscillatory | 0.037788+0.000000j | True |
df.loc[1869288]
| ba | bb | Va | Vb | kaa | kba | kab | kbb | mua | mub | d_B | d_A | n | ss_n | ss_list | ss_class | system_class | maxeig | complex_dispersion | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ss | |||||||||||||||||||
| 0 | 0.01 | 0.01 | 727.246993 | 34.303082 | 4.047835 | 1.469768 | 0.212337 | 1.200459 | 1.293261 | 0.817094 | 9.675184 | 1.0 | 2.0 | 1.0 | [0.03357005450353577, 1.0359803479365348] | stable spiral | turing I oscillatory | 0.140083+0.000000j | True |
lsa_df= pickle.load( open(modellingpath + "/growth/out/analytical/lsa_dataframes/lsa_df_%s_variant%r_%rparametersets.pkl"%(circuit_n,variant,n_param_sets), "rb"))
lsa_df
| ba | bb | Va | Vb | kaa | kba | kab | kbb | mua | mub | d_B | d_A | n | ss_n | ss_list | ss_class | system_class | maxeig | complex_dispersion | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 0.01 | 0.01 | 30.117387 | 106.659012 | 101.031181 | 0.110266 | 3.006921 | 0.370174 | 0.021408 | 0.524208 | 0.002191 | 1.0 | 2.0 | 2.0 | [0.467134082670621, 4.813937058901632] | stable point | simple stable | -0.021409+0.000000j | False |
| 1 | 0.01 | 0.01 | 30.117387 | 106.659012 | 101.031181 | 0.110266 | 3.006921 | 0.370174 | 0.021408 | 0.524208 | 0.002191 | 1.0 | 2.0 | 2.0 | [0.4646286711945737, 4.763717422192187] | stable point | simple stable | -0.021409+0.000000j | False | |
| 2 | 0 | 0.01 | 0.01 | 840.234641 | 175.845505 | 0.393501 | 1.111872 | 0.193808 | 0.300886 | 0.027935 | 0.00243 | 9.639038 | 1.0 | 2.0 | 1.0 | [0.3579847646089406, 55963.782124851234] | stable point | simple stable | -0.002430+0.000000j | False |
| 3 | 0 | 0.01 | 0.01 | 237.15197 | 13.70142 | 3.070877 | 0.525973 | 26.087472 | 2.467677 | 3.855762 | 0.001846 | 0.14785 | 1.0 | 2.0 | 1.0 | [0.0025937558718074523, 5.417458575619242] | stable point | simple stable | -0.001846+0.000000j | False |
| 4 | 0 | 0.01 | 0.01 | 18.501211 | 11.102393 | 0.799942 | 81.252957 | 131.624941 | 0.655627 | 0.029659 | 0.062291 | 0.027914 | 1.0 | 2.0 | 1.0 | [192.6888144770627, 121.68785390465611] | stable spiral | simple stable | -0.045975+0.036810j | True |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 1999998 | 0 | 0.01 | 0.01 | 389.627545 | 32.272899 | 69.113253 | 0.596815 | 0.125721 | 1.788481 | 5.328112 | 0.002996 | 4.672408 | 1.0 | 2.0 | 1.0 | [0.0018768374787926174, 5.737724447115397] | stable point | simple stable | -0.002996+0.000000j | False |
| 1999999 | 0 | 0.01 | 0.01 | 410.030107 | 738.276678 | 5.093089 | 61.629085 | 36.580175 | 2.832781 | 12.822408 | 3.807407 | 0.008583 | 1.0 | 2.0 | 3.0 | [0.0007800771696116996, 0.0026264818297415025] | stable point | simple stable | -3.807407+0.000000j | False |
| 1 | 0.01 | 0.01 | 410.030107 | 738.276678 | 5.093089 | 61.629085 | 36.580175 | 2.832781 | 12.822408 | 3.807407 | 0.008583 | 1.0 | 2.0 | 3.0 | [19.844543061701074, 44.09316650087448] | stable spiral | simple stable | -5.078776+0.000000j | True | |
| 2 | 0.01 | 0.01 | 410.030107 | 738.276678 | 5.093089 | 61.629085 | 36.580175 | 2.832781 | 12.822408 | 3.807407 | 0.008583 | 1.0 | 2.0 | 3.0 | [0.8320563116927623, 0.10289748702093715] | unstable point | simple unstable | 12.132485+0.000000j | False | |
| 2000000 | 0 | 0.01 | 0.01 | 44.867121 | 95.558215 | 23.542469 | 17.933697 | 17.123672 | 20.034032 | 2.052339 | 0.057336 | 0.001193 | 1.0 | 2.0 | 1.0 | [0.0048732919851288865, 0.1744300725036112] | stable point | simple stable | -0.057336+0.000000j | False |
2663471 rows × 19 columns